﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Argos.Workflows
{
	/// <summary>
	/// The interface that must be implemented by any workflow that is used to monitor
	/// a target for failures.
	/// </summary>
	public interface ITargetFailureMonitoringWorkflow : ITargetMonitoringWorkflow
	{

		/// <summary>
		/// When implemented in a class, sets or returns the last error that occured while executing a test in the workflow.
		/// </summary>
		Exception LastTestError { get; set; }

		/// <summary>
		/// When implemented in a class, handles a failed test.
		/// </summary>
		/// <param name="ex"></param>
		void HandleTestFailure(Exception ex);

		/// <summary>
		/// When implemented in a class, handles a successful test.
		/// </summary>
		void HandleTestSuccess();

	}
}
